import request from '@/utils/request'

// 查询监控调取申请列表
export function listRequest(query) {
  return request({
    url: '/monitor/request/list',
    method: 'get',
    params: query
  })
}

// 查询监控调取申请详细
export function getRequest(requestId) {
  return request({
    url: '/monitor/request/' + requestId,
    method: 'get'
  })
}

// 新增监控调取申请
export function addRequest(data) {
  return request({
    url: '/monitor/request',
    method: 'post',
    data: data
  })
}

// 修改监控调取申请
export function updateRequest(data) {
  return request({
    url: '/monitor/request',
    method: 'put',
    data: data
  })
}

// 删除监控调取申请
export function delRequest(requestId) {
  return request({
    url: '/monitor/request/' + requestId,
    method: 'delete'
  })
}

// 获取当前用户可访问的地点列表
export function getUserAccessibleLocations() {
  return request({
    url: '/monitor/permission/locations',
    method: 'get'
  })
}
